<?php
/* @var $this MstJnsAsuransiController */
/* @var $model MstJnsAsuransi */


$this->breadcrumbs=array(
	'Kota'=>array('index'),
	'Manage',
);


Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#mst-city-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Kota</h1>
<a href="<?php echo Yii::app()->createUrl('mstCity/create'); ?>" class="btn btn-sm btn-primary">Add New</a><br /><br />


<?php echo CHtml::link('Search','#',array('class'=>'search-button btn')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('bootstrap.widgets.TbGridView',array(
	'id'=>'mst-city-grid',
	'dataProvider'=>$model->search(),
	//'filter'=>$model,
	'columns'=>array(
		//'id',
		array(
			'name'=>'id_propinsi',
			'value'=>'MstPropinsi::model()->findByPk($data->id_propinsi)->nm_propinsi',
			),
		'nm_city',
				array(
                'class'=>'bootstrap.widgets.TBButtonColumn',
               'template' => '{view}{update}{delete}',
               'buttons' => array(
               				'view' => array(
								'options'=>array(
								'class'=>'btn btn-small view'
								)
                            ),

               				'update' => array(
								'options'=>array(
								'class'=>'btn btn-small update'
								)
                            ),


                            'delete' => array(
                              'options'=>array(
                                   'class'=>'btn btn-small delete'
                                   ),
                            ),

                            

                     /*         
                    'delete' => array(
                         'label'=> 'Delete',
                         'url'=>'Yii::app()->createUrl("ndkHealth/delete",array("id"=>$data->id))',
                         'options'=>array(
                              'class'=>'btn btn-small delete'
                         )
                    )
                    */
               ),
            'htmlOptions'=>array('style'=>'width: 150px'),
           )
	),
)); ?>